#ifndef _BASH_
#define _BASH_

#define YELLOW "\033[0;33;24m"
#define NONE   "\033[0m"
struct Value
{	
	char name[20];
	char gxqm[40];
	char bm[20];
	char dh[20];
	char yx[40];
	char IP[20];
	char Mac[20];
	struct Value *next;
};
typedef struct Value value;

struct Pack
{
	int size;
	char version[30];
	char packnum[20];
	char username[20];
	char hostname[30];
	char cmd[20];
	char name[200];
	char bm[200]; 
	char Mac[20];
	char dh[20];
	char yx[40];
	char IP[20];
	char tx[10];
	char gxqm[40];
	char hostnum[30];
	struct Pack *next;

};
typedef struct Pack pack;

struct TransFileInfo
{
	char packnum[30];
	unsigned long fileId;
	char filename[128];
	unsigned long offset;
	unsigned long fileSize;
	int status;     //0 for notstart and 1 for start
	unsigned long startTime;
	char IP[30];
};
typedef struct TransFileInfo file_download_upload;

value *read_pzfile();
void cpy(value *p,pack *pack_head);
int set_value(char *key,char *new_value,value *p);
int get_value(char *key,value *p);
pack* analysis_recvbuf(int size,char *recvbuf);
void send_pack2097440(pack *file_r,char *new_value);
int jiance_IP(pack *r);
int send_message(char *key,char *new_value);

#endif